package com.fantasy.entity;

import java.math.BigInteger;
import java.sql.Date;
import java.util.Objects;
//视频实体类
public class Video {
    //视频id
    private Integer id;
    //视频名
    private String name;
    //用户id
    private Integer userId;
    //类型id
    private Integer typeId;
    //描述
    private String describe;
    //审核 1是通过，0不通过
    private Integer examine;
    //是否可观看 1是可观看，0不可观看
    private Integer isViewable;
    //上传日期
    private String uploadDate;
    //点赞数
    private Integer starNum;
    //收藏数
    private Integer collectionNum;
    //路径
    private String url;
    //视频封面
    private String videoImg;
    //视频访问量
    private Integer visit;

    public Video() {
    }

    public Video(Integer id, String name, Integer userId, Integer typeId, String describe, Integer examine, Integer isViewable, String uploadDate, Integer starNum, Integer collectionNum, String url, String videoImg, Integer visit) {
        this.id = id;
        this.name = name;
        this.userId = userId;
        this.typeId = typeId;
        this.describe = describe;
        this.examine = examine;
        this.isViewable = isViewable;
        this.uploadDate = uploadDate;
        this.starNum = starNum;
        this.collectionNum = collectionNum;
        this.url = url;
        this.videoImg = videoImg;
        this.visit = visit;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public String getVideoImg() {
        return videoImg;
    }

    public void setVideoImg(String videoImg) {
        this.videoImg = videoImg;
    }

    public Integer getVisit() {
        return visit;
    }

    public void setVisit(Integer visit) {
        this.visit = visit;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public Integer getExamine() {
        return examine;
    }

    public void setExamine(Integer examine) {
        this.examine = examine;
    }

    public Integer getIsViewable() {
        return isViewable;
    }

    public void setIsViewable(Integer isViewable) {
        this.isViewable = isViewable;
    }

    public String getUploadDate() {
        return uploadDate;
    }

    public void setUploadDate(String uploadDate) {
        this.uploadDate = uploadDate;
    }

    public Integer getStarNum() {
        return starNum;
    }

    public void setStarNum(Integer starNum) {
        this.starNum = starNum;
    }

    public Integer getCollectionNum() {
        return collectionNum;
    }

    public void setCollectionNum(Integer collectionNum) {
        this.collectionNum = collectionNum;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public String toString() {
        return "Video{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", userId=" + userId +
                ", typeId=" + typeId +
                ", describe='" + describe + '\'' +
                ", examine=" + examine +
                ", isViewable=" + isViewable +
                ", uploadDate='" + uploadDate + '\'' +
                ", starNum=" + starNum +
                ", collectionNum=" + collectionNum +
                ", url='" + url + '\'' +
                ", videoImg='" + videoImg + '\'' +
                ", visit=" + visit +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Video video = (Video) o;
        return Objects.equals(id, video.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }

}
